package com.captain.special.字符串;

/**
 * Des:
 *
 * @author XL
 * @Date 2022/4/5 15:27
 */
public class 反转字符串344 {

    public void reverseString(char[] s) {
        int left = 0;
        int right = s.length - 1;
        while (left <= right) {
            char temp = s[left];
            s[left] = s[right];
            s[right] = temp;
            left++;
            right--;
        }
    }
}
